package com.ck.ips.controller;

import com.ck.core.annotation.LoginRequired;
import com.ck.ips.service.DataBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 数据看板
 *
 * @author XC17125
 */
@LoginRequired
@RestController
@RequestMapping(value = "/data/board")
public class DataBoardController {


    @Autowired
    DataBoardService dataBoardService;

    /**
     * 获取广告实时投放状态
     *
     * @return 最近6个的广告投放状态
     */
    @GetMapping(value = "/program/realtime")
    public Object getRealTimeProgram() {
        return dataBoardService.getRealTimeProgram();
    }

    /**
     * 获取覆盖城市数量、商场数、屏幕数、覆盖人数
     *
     * @return 覆盖城市数量、商场数、屏幕数、覆盖人数
     */
    @GetMapping(value = "/main/static")
    public Object getMainStatic() {
        return dataBoardService.getMainStatic();
    }

    /**
     * 地图区域展示
     * 获取各省份 门店数量，设备数量，覆盖人数
     *
     * @return 门店数量，设备数量，覆盖人数
     */
    @GetMapping(value = "/province/map")
    public Object getProvinceMapData() {
        return dataBoardService.getProvinceMapData();
    }

    /**
     * 广告上刊趋势
     *
     * @return 广告月份数量
     */
    @GetMapping(value = "/program/count")
    public Object getProgramCountByMonth() {
        return dataBoardService.getProgramCountByMonth();
    }

    /**
     * 屏幕分布
     *
     * @return 屏幕分布
     */
    @GetMapping(value = "/screen/size")
    public Object getScreenSizeCount() {
        return dataBoardService.getScreenSizeCount();
    }

    /**
     * 商场年度广告上刊排行榜
     *
     * @return 商场年度广告上刊排行榜
     */
    @GetMapping(value = "/store/program")
    public Object getStoreProgramCount() {
        return dataBoardService.getStoreProgramCount();
    }

    /**
     * 获取led屏幕状态统计
     *
     * @return 获取led屏幕状态统计
     */
    @GetMapping(value = "/led/status")
    public Object getLedStatus() {
        return dataBoardService.getLedStatus();
    }

    /**
     * 获取每日刊播汇总统计
     * @return 每日刊播汇总统计
     */
    @GetMapping(value = "/monitor")
    public Object getMonitorData() {
        return dataBoardService.getMonitorData();
    }

}
